package com.gzgy.ustore.api.dao.impl;

import com.gzgy.ustore.api.common.jdbc.StatementParameter;
import com.gzgy.ustore.api.dao.UserRoleDao;
import com.ustore.model.UserRole;
import org.springframework.stereotype.Repository;

@Repository
public class UserRoleDaoImpl  extends AbstractBaseDao<UserRole> implements UserRoleDao{
    @Override
    public UserRole getRecordByUserId(Integer userId) {
        String sql = "SELECT * FROM "+this.tableName+" WHERE USER_ID = ?";
        StatementParameter parameter = new StatementParameter();
        parameter.setInt(userId);

        return this.query(sql,UserRole.class,parameter);
    }
}
